angular.module('wf-utils')
.service('commonConstant', ($rootScope, $http)->
        pageTableCount:10
        modalTableCount:10
        tableCounts:[5,10,20]
        testBackEnd:'http://pkcrm.api.test.ostengar.com/pkcrm'
#        testBackEnd:'http://10.100.224.103:9001/pkcrm'
        sexList:(canEmpty)->##性别状态
            list = [
                {value:true, name:'男', remark:'man'},
                {value:false, name:'女', remark:'woman'},
            ];
            if(canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        pkSexList:(canEmpty)->##性别状态
            list = [
                {value:1, name:'男', remark:'man'},
                {value:2, name:'女', remark:'woman'}
#                {value:0, name:'保密', remark:'woman'}
            ];
            if(canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        enabledList:(canEmpty)->##数据状态
            list= [
                {value:true,name:'启用',remark:'enable'}
                {value:false,name:'禁用',remark:'disable'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        roleTypeList:(canEmpty)->
            list = [
                {value:1,name:'管理员',remark:'system'}
                {value:2,name:'业务人员',remark:'business'}
                {value:3,name:'客服',remark:'service'}
            ]
            if (canEmpty==true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        authorizationTypeList:(canEmpty)->##权限类型
            list= [
                {value:1,name:'管理员',remark:'system'}
                {value:2,name:'业务人员',remark:'business'}
                {value:3,name:'客服',remark:'service'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        menuLvList:(canEmpty)->#菜单层级
            list= [
                {value:1,name:'一级菜单'}
                {value:2,name:'二级菜单'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        menuTypeList:(canEmpty)->#菜单类型（是否为叶子节点）
            list= [
                {value:true,name:'页面'}
                {value:false,name:'菜单'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        resourceTypeList:(canEmpty)->##资源类型
            list=[
                {value:'uri', name:'API接口资源', remark:'url'},
                {value:'page', name:'页面资源', remark:'page'},
                {value:'button', name:'按钮资源', remark:'button'},
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        methodTypeList:(canEmpty)->##uri方法
            list=[
                {value:'GET',name:'get方法',remark:'get'},
                {value:'POST',name:'post方法',remark:'post'},
                {value:'PUT',name:'put方法',remark:'put'},
                {value:'DELETE',name:'delete方法',remark:'delete'},
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list

        #pook
        b2bCustomerTypeList:(canEmpty)->
            list=[
                {value:1,name:'品牌客户'},
                {value:2,name:'供应商'},
                {value:3,name:'渠道商'},
                {value:4,name:'服务商'},
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        b2bCategoryLvlList:(canEmpty)->
            list=[
                {value:1,name:'一级品类'},
                {value:2,name:'二级品类'},
                {value:3,name:'三级品类'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
        b2bCustomerStatusList:(canEmpty)->
            list=[
                {value:0,name:'未审批'},
                {value:1,name:'已审批'},
                {value:2,name:'审批不通过'}
            ]
            if (canEmpty == true)
                list.splice(0, 0, {value: undefined, name: '全部', remark: 'all'})
            list
)